<template>
    <dl class="pro-item">
        <dt>
            <img src="../assets/imgs/logo.png" alt="">
        </dt>
        <dd>
            <h2>{{title}}</h2>
            <span>购买的数量：{{num}}</span>
            <span>价格:{{price}}</span>
            <span @click="open">+</span>
        </dd>
    </dl>
</template>
<script>
export default {
    props:['title','price','id','num'],
    methods:{
        open(){
            this.$emit('open',this.id)
        }
    }
}
</script>
<style lang="scss">
    .pro-item{
        width:100%;
        display: flex;
        img{
            width:80px;
        }
        dd{
            flex:1;
        }
    }
</style>

